QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Using Renderer View Tools

QuickDraw 3D supports two tools, which you can call only from a renderer plug-in module, that report rendering progress.

Q3XView_IdleProgress

The Q3XView_IdleProgress function can be called by a renderer to call the user idle method and provide progress information. The user must have supplied an idleProgress method using Q3XView_SetIdleProgressMethod ; otherwise, the generic idle method Q3View_SetIdleMethod will be called with no progress data.

TQ3Status Q3XView_IdleProgress (
                     TQ3ViewObject view,
                     unsigned long current,
                     unsigned long completed );
view
A view object.
current
A progress value in the range 0.. n -1, where n is the value of completed .
completed
The maximum progress number.

DESCRIPTION

The Q3XView_IdleProgress function passes, in the current parameter, a value that represents rendering progress from 0 to the value of completed. It returns kQ3Failure if rendering is cancelled.

SEE ALSO

You can use view idle methods to interrupt long renderings. While running the idler callback, the application can check for a Command-period key event or a mouse click on a Cancel button to see if the user wants to interrupt rendering. View idle methods are discussed in Chapter 13 , "Application-Defined Routines" .

Q3XView_EndFrame

An asynchronous renderer calls the Q3XView_EndFrame function when it completes a frame.

TQ3Status Q3XView_EndFrame (TQ3ViewObject view);
view
A view object.

DESCRIPTION

The Q3XView_EndFrame function tells the view object view that an asynchronous renderer has finished rendering a frame.

The Q3XView_EndFrame function differs from Q3View_Sync in that notification of frame completion takes place in the opposite direction. With Q3View_Sync , the application asks a renderer to finish rendering a frame and blocks until the frame is complete. With Q3XView_EndFrame , the renderer tells the application that it has completed a frame.

If Q3View_Sync is called before Q3XView_EndFrame , Q3XView_EndFrame will never be called. If Q3View_Sync is called after Q3XView_EndFrame , Q3XView_EndFrame will return immediately because the frame has already been completed.

Q3View_Sync is described in "Q3View_Sync" .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |